﻿using System;
using System.Collections.Generic;
using _5E.Infrastructure.Querying;

namespace _5E.Infrastructure.Domain
{
    public interface IReadOnlyRepository<T, TId> where T : IAggregateRoot
    {
        T FindBy(TId id);

        IEnumerable<T> FindAll();

        IEnumerable<T> FindAll(Int32 pageIndex, Int32 pageSize);

        IEnumerable<T> FindBy(Query query);

        IEnumerable<T> FindBy(Query query, Int32 pageIndex, Int32 pageSize);

        Int32 RowCount(Query query);
    }
}
